package com.ruike.alisurface.ui.payPage;

import android.graphics.Color;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.ruike.alisurface.R;
import com.ruike.alisurface.Serials.MsgEventBus;
import com.ruike.alisurface.base.BaseAty;

import butterknife.BindView;

/**
 * 支付刷脸出货完成页
 */
public class PayfaceSuccessActivity extends BaseAty {

    private static final String TAG = "tjf";

    @BindView(R.id.payFaceSuccess_outGoodsResult_imgv)
    ImageView outGoodsResultImgv;
    @BindView(R.id.payFaceSuccess_outGoodsResult_tv)
    TextView outGoodsResultTv;
    @BindView(R.id.payFaceSuccess_time_tv)
    TextView countdownTimeTv;


    @Override
    protected int getLayoutResId() {
        return R.layout.activity_payface_success;
    }

    @Override
    protected void onResume() {
        super.onResume();
        startCountdownTimer(5, countdownTimeTv, null);
    }

    @Override
    protected void initViews() {
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            boolean isSuccess = bundle.getBoolean("isSuccess", true);
            outGoodsResultImgv.setImageResource(isSuccess ? R.drawable.icon_outgoods_success : R.drawable.icon_outgoods_fail);
            outGoodsResultTv.setText(isSuccess ? "出货成功" : "出货失败");
            outGoodsResultTv.setTextColor(Color.parseColor(isSuccess ? "#1e97c5" : "#D1251A"));
        }
    }

    @Override
    protected void initData() {
    }


    @Override
    public void doEventBusResult(MsgEventBus event) {
    }

}
